import os

'''获取设备信息'''

class DosCmd:
    def excute_cmd_result(self,command):
        result_list = []
        result = os.popen(command).readlines()
        for i in result:
            if i == '\n':
                continue
            result_list.append(i.strip('\n'))
        print(result_list)
        return result_list

    def excute_cmd(self,command):
        os.system(command)

if __name__ == '__main__':
    dos = DosCmd()
    dos.excute_cmd_result('adb devices')